{% extends 'base.html' %}

{% block title %} {{ product_type.type_name }}类商品 {% endblock %}

{% block page_name %} {{ product_type.type_name }}类商品 {% endblock %}

{% block content %}
    <!-- 所有该种类型的产品 -->
	<div class="products">
		<div class="container">
			<div class="col-md-8 products-right">
				<div class="products-right-grid">
					<div class="products-right-grids">
						<div class="clearfix"> </div>
					</div>
				</div>
				<div class="agile_top_brands_grids">
					<!--筛选出来的相关类型的商品-->
					{% for product in type_products %}
						<div class="col-md-4 top_brand_left">
							<div class="hover14 column">
								<div class="agile_top_brand_left_grid">
									<div class="agile_top_brand_left_grid_pos">
									</div>
									<div class="agile_top_brand_left_grid1">
										<figure>
											<div class="snipcart-item block">
												<div class="snipcart-thumb">
													<!--跳转到single_product.html,用产品Id,显示对应商品详细信息-->
													<!--产品图片-->
													<!--产品名称-->
													<!--产品价格-->
													<a href=""><img style="width: 100px; height: 100px;" title=" " alt=" " src="{{ product.product_img }}"></a>
													<p>{{ product.product_name }}</p>
													<h4>${{ product.product_price }}</h4>
												</div>
												<!--加入购物车-->
												<div class="snipcart-details top_brand_home_details">
													<form action="#" method="post">
														<fieldset>
															<input type="hidden" name="cmd" value="_cart">
															<input type="hidden" name="add" value="1">
															<input type="hidden" name="business" value=" ">
															<!--产品名称-->
															<input type="hidden" name="item_name" value="{{ product.product_name }}">
															<!--产品价格-->
															<input type="hidden" name="amount" value="{{ product.product_price }}">
															<input type="hidden" name="discount_amount" value="1.00">
															<input type="hidden" name="currency_code" value="CNY">
															<input type="hidden" name="return" value=" ">
															<input type="hidden" name="cancel_return" value=" ">
															<input type="submit" name="submit" value="加入购物车" class="button">
														</fieldset>
													</form>
												</div>
											</div>
										</figure>
									</div>
								</div>
							</div>
						</div>
					{% endfor %}
						<div class="clearfix"> </div>
				</div>
				<!--分页信息-->
				<nav class="numbering">
					<ul class="pagination paging">
						<li>
							<a href="#" aria-label="Previous">
								<span aria-hidden="true">&laquo;</span>
							</a>
						</li>
						<li class="active"><a href="#">1<span class="sr-only">(current)</span></a></li>
						<li><a href="#">2</a></li>
						<li><a href="#">3</a></li>
						<li><a href="#">4</a></li>
						<li><a href="#">5</a></li>
						<li>
							<a href="#" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
							</a>
						</li>
					</ul>
				</nav>
			</div>
			<div class="clearfix"> </div>
		</div>
	</div>
{% endblock %}